<?php

class Country_Model_DbTable_Songs extends Engine_Db_Table
{
  protected $_rowClass = 'Country_Model_Song';
  
  
    public function getSellectAllSongOfCountry($country_id){
        $photo = Engine_Api::_()->getDbtable('songs','country');
        $aPhoto = Engine_Api::_()->getDbtable('playlistSongs','music');
        
        $select = $aPhoto->select()
                         ->setIntegrityCheck(false)
                         ->from($aPhoto->info('name'),"*")
                         ->join($photo->info('name'),$photo->info('name').".s_id = ".$aPhoto->info('name').".song_id",$photo->info('name').".song_id as s_id")
                         ->where($photo->info('name').".country_id = $country_id");
                    
        return $select;
    }
}
